home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / gsdb25.zip / DB_XPL09.PAS < prev    next >
Pascal/Delphi Source File  |  1990-11-29  |  718b  |  29 lines

  1. program DB_Xpl09;
  2. uses
  3.    CRT,
  4.    DOS,
  5.    GS_dBFld,
  6.    GS_dBase;
  7. var
  8.    Health  : GS_dBFld_Objt;
  9.  
  10. begin
  11.    ClrScr;
  12.    Health.Init('HEALTH');
  13.    Health.Open;
  14.    Health.IndexTo('FOODCODE','FOOD_CODE');
  15.                                     {Create an index.  Use field FOOD_CODE}
  16.                                     {and create a .NDX file named FOODCODE}
  17.  
  18.    Health.Index('FOODCODE');        {Use Index FOODCODE.NDX}
  19.    Health.GetRec(Top_Record);
  20.    while not Health.File_EOF do
  21.    begin
  22.       writeln(Health.FieldGet('FOOD'),'   ',
  23.               Health.FieldGet('CALS'),'   (',
  24.               Health.FieldGet('FOOD_CODE'),')');
  25.       Health.GetRec(Next_Record);
  26.    end;
  27.    Health.Close;
  28. end.
  29.